package com.cskaoyan.shopping.controller;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.shopping.form.CartRequest;
import com.cskaoyan.shopping.service.ICartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @projectName: duolaimall
 * @package: com.cskaoyan.shopping.controller
 * @className: IShoppingItemsController
 * @author: 杨浩祥
 * @description: TODO
 * @date: 2022/10/26 10:45
 * @version: 1.0
 */
@RestController
public class IShoppingItemsController {

    @Autowired
    ICartService cartService;

    @DeleteMapping("/shopping/items/{uid}")
    public ResponseData deleteCartCheckedItem(@PathVariable("uid") long uid){
        cartService.deleteCheckedItem(uid);
        return new ResponseUtil().setData("成功","success");
    }

}
